import QtQuick 2.0

Rectangle {
    id: root

    property string text: ""
    signal deleteItem()

    visible: selectedC1
    width: 55*dp
    height: 24*dp
    color: "#F0F0F0"
    Text {
        text: root.text
        anchors.verticalCenter: parent.verticalCenter
        font.pixelSize: config.fontsize
        x: 5
    }
    Item{
        height: 24*dp
        width: 15*dp
        x: 40*dp
        Text{
            text: "X"
            color: "#AAAAAA"
            anchors.verticalCenter: parent.verticalCenter
            font.pixelSize: config.fontsize
        }
        MouseArea{
            anchors.fill: parent
            cursorShape: Qt.PointingHandCursor
            onReleased: {
                root.deleteItem()
            }
        }
    }
}
